import request from "../utils/axios"



//1.1 文章列表展现
export const getArticleList = (cid)=>{
    let url = `/article/getArticle?cid=${cid}`
    return request.get(url)
}
//1.3 根据文章ID查询详情信息
export const getArticleById = (id)=> {
    let url = `/article/findArticleById?id=${id}`
    return request.get(url)
}
//3.2.2 文章新增_提交
export const saveArticle = (article)=> {
    let url = `/article/saveArticle`
    return request.post(url,article)
}
//3.3 文章删除
export const deleteArticleById = (id)=> {
    let url = `/article/deleteArticleById?id=${id}`
    return request.delete(url)
}
//3.3 文章修改
export const updateArticle = (article)=> {
    let url = `/article/updateArticle`
    return request.put(url,article)
}